package com.molichuxing.gateway.bff.dealer.services;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.gateway.bff.dealer.entity.request.create.DealerCreateVo;
import com.molichuxing.gateway.bff.dealer.entity.request.create.DealerEsignCreateVo;
import com.molichuxing.gateway.bff.dealer.entity.request.modify.DealerModifyStatusVo;
import com.molichuxing.gateway.bff.dealer.entity.request.modify.DealerModifyVo;
import com.molichuxing.gateway.bff.dealer.entity.response.*;

import java.util.List;
import java.util.Map;

/**
 * 经销商信息相关bff
 *
 * @author zhaopenghui
 * @date 2019年8月26日
 */
public interface DealerBffService {

    /**
     * 获取经销商信息列表
     *
     * @param params
     * @param pageNum
     * @param pageSize
     * @return
     */
    Paged<DealerListVo> getDealerPage(Map<String, Object> params, Integer pageNum, Integer pageSize) throws Exception;

    /**
     * 详情-获取经销商基础信息
     *
     * @param dealerId
     * @return
     * @throws Exception
     */
    DealerInfoVo getDealerInfo(Integer dealerId) throws Exception;

    /**
     * 详情-电子章信息
     *
     * @param dealerId
     * @return
     * @throws Exception
     */
    DealerEsignInfoVo getDealerEsignInfoVo(Integer dealerId) throws Exception;

    /**
     * 编辑经销商信息
     *
     * @param dealerModifyVo
     * @return
     * @throws Exception
     */
    Boolean modifyDealer(DealerModifyVo dealerModifyVo) throws Exception;


    /**
     * 编辑经销商营业状态
     *
     * @param dealerModifyStatusVo
     * @return
     * @throws Exception
     */
    Boolean modifyDealerStatus(DealerModifyStatusVo dealerModifyStatusVo) throws Exception;

    /**
     * 添加经销商
     *
     * @param dealerCreateVo
     * @return
     * @throws Exception
     */
    Boolean createDealer(DealerCreateVo dealerCreateVo) throws Exception;

    /**
     * 经销商门店联动
     *
     * @return
     * @throws Exception
     */
    List<DealerStoreVo> getDealerStore(Integer status, Integer type, Integer dealerId, Boolean dealerIsShow) throws Exception;

    /**
     * 经销商信息
     *
     * @return
     * @throws Exception
     */
    List<DealerVo> getDealerList() throws Exception;

    /**
     * 查询所有存在经销商的省份信息
     *
     * @return
     */
    List<DealerProvinceVo> getDealerProvince();

    /**
     * 查询经销商基本信息
     *
     * @param provinceId 省id
     * @return
     */
    List<DealerVo> getDealer(Integer provinceId);

    /**
     * 创建经销商印章
     *
     * @param list
     * @return
     * @throws Exception
     */
    Boolean createDealerEsign(List<DealerEsignCreateVo> list) throws Exception;

    List<DealerVo> getDealerListByParam(Map<String, Object> param);

    /**
     * 经销商名称模糊查询
     *
     * @param dealerName
     * @param status
     * @param type
     * @return
     */
    public List<DealerVo> getDealerByShortNameFuzzy(String dealerName, Integer status, Integer type);
}
